<template>
  <div class='musicList'>
    <van-cell-group inset>
      <div class="tileBox">
        <div class="title">{{ title }}</div>
        <div class="append">编辑</div>
      </div>
      <van-cell
        v-for="item in homeSongList"
        :key="item.name"
        :to="{
          name: 'songList',
          params: {
            songListId: item.id,
            trackCount: item.trackCount
          }
        }"
      >
      <div slot="icon">
        <img class="songListPic" :src="item.coverImgUrl + '?param=100y100'" alt="">
      </div>
      <div slot="title" class="songListTitle">
        {{ item.name }}
      </div>
      <div slot="label">
        {{ item.trackCount }}首
      </div>
      </van-cell>
    </van-cell-group>
  </div>
</template>

<script>
import { Cell, CellGroup } from 'vant'
export default {
  name: 'homeSongList',
  components: {
    [Cell.name]: Cell,
    [CellGroup.name]: CellGroup
  },
  props: {
    homeSongList: {
      required: true
    },
    title: {
      default: '歌单'
    }
  },
  data () {
    return {}
  },
  computed: {

  },
  watch: {},
  created () {},
  mounted () {},
  methods: {}
}
</script>
<style lang='less' scoped>
.musicList {
  margin-top: 22px;
  .tileBox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 17px 0px 17px;
    .title {
      font-size: 21px;
    }
    .append {
      height: 20px;
      width: 45px;
      border: 1px solid #cfcfcf;
      border-radius: 20px;
      font-size: 13px;
      text-align: center;
      line-height: 20px;
      color: #cfcfcf;
    }
  }
  .songListPic {
    width: 49px;
    height: 49px;
    border-radius: 5px;
    margin-right: 10px;
    background-color: pink;
  }
  .songListTitle {
    width: 252px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .van-cell-group--inset {
    box-shadow: 0px 0px 32px #ebebeb;
    border-radius: 15px;
    .van-cell {
      height: 67px;
      font-size: 16px;
    }
    .van-cell::after {
      border-bottom: unset;
    }
  }
}
</style>
